<?php

class Header {

    private $CI;

    function __construct() {
        $this->CI = & get_instance();
        $this->CI->load->library("session");
    }

    function getSessionType($type) {
        return $this->CI->session->userdata($type) ;
    }
}
$header = new Header();

?>

<div id='cssmenu'>
    <?php
    if ($header->getSessionType("school_name") != null) {
        ?>
    <ul>
        <li class='has-sub '><a href='#'><?php echo $header->getSessionType("school_name"); ?></a>
            <ul>
                <li><a href='<?php echo site_url('sekolah/data_sekolah') ?>'>Data Sekolah</a></li>
                <li><a href='<?php echo site_url('sekolah/data_guru') ?>'>Data Guru</a></li>
                <li><a href='<?php echo site_url('sekolah/jenjang_pendidikan') ?>'>Jenjang Pendidikan</a></li>
                <li><a href='<?php echo site_url('sekolah/prestasi') ?>'>Prestasi Siswa</a></li>
                <li><a href='<?php echo site_url('sekolah/prestasi_guru') ?>'>Prestasi Guru</a></li>
                <li><a href='<?php echo site_url('sekolah/resume_data_siswa') ?>'>Resume Data Siswa</a></li>
            </ul>
        </li>
    </ul>
    <ul>
        <li class='has-sub '><?php echo anchor('logon/out','LOGOUT');?></li>
    </ul>
    <?php

    }
    ?>
</div>